
//--------------------------------------------------------------------------------------------------------------------
// function to save the base into the files
function saveRoom() 
{   
    var test1 = confirm('This action will save the base into file. The same action is taken when supressing an asset. Do you want to continue?');
	if( test1 )
	{
	    return submitWithReload(
            "/admin2/saveRoom/",
            {},//no input to the request
            'Base succesfully saved to text files'
            ); 
     }
	return false;
};

//--------------------------------------------------------------------------------------------------------------------
// function to create the base from the files previously saved. THIS OVERIDE THE CURRENT BASE
function createRoom() 
{   
    var test1 = confirm('PLEASE CONSIDERE THAT THE CURRENT DATA BASE WILL BE OVERWRITTEN. The data base will be recreated from the last saved files. ALL THE DATA SINCE WILL BE LOST. Do you want to continue?');
	if( test1 )
	{
	    return submitWithReload(
            "/admin2/createRoom/",
            {},//no input to the request
            'Base succesfully created from text files'
            ); 
    }   
	return false;
};

//--------------------------------------------------------------------------------------------------------------------
// this notify the server that the user has last visited the specified contract so that it will send the correct information at the request
function addANewPlayer()
{
   return submitWithoutReload( 
        '/admin2/createNewPlayer/',
        $('#id_addPlayer'),
        '#id_messageDiv',
        'The Player has been successfully added'
        );
};

